cmake_minimum_required(VERSION 3.0.0)
project(snowboy)

# 包含当前目录以便找到头文件
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

# 创建 snowboy-wrapper 库
add_library(snowboy-wrapper STATIC snowboy-detect-c-wrapper.cc)
target_compile_options(snowboy-wrapper PRIVATE -D_GLIBCXX_USE_CXX11_ABI=0)

# 导入静态库 snowboy-detect
add_library(snowboy-detect STATIC IMPORTED GLOBAL)
set_target_properties(snowboy-detect PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/libsnowboy-detect.a)
